﻿//var number = -1;

////0 is Falsey
//if (number) {
//    console.log('True!');
//}
//else {
//    console.log('False!');
//}

//var myArray = [];

//var chair = {};

////chair = null;

//if (chair) {
//    console.log('Chair results to TRUE (it is NOT Null)');
//} else {
//    console.log('Chair results to FALSE (it is NULL)');
//}

//var isActive = 'false';

//if (isActive) {
//    console.log("You're Active!!");
//} else {
//    console.log("You're INACTIVE!");
//}

//var myName = 'Nick';
//var myNumber = 6;

//if (myNumber <= 10) {
//    console.log('Your number is 6!');
//} else {
//    console.log('Your number is NOT 6');
//}

var ticketArray = [];

var t1 = {
    number: 4,
    description: 'My computer has an error',
    userName: 'Tom'
};

var t2 = {
    description: 'Screen does not come on',
    userName: 'Beth'
};

t2.number = 10;

ticketArray.push(t1, t2);

for (var i in ticketArray) {
    for (var j in ticketArray[i]) {
        var ticket = ticketArray[i];
        if (ticket.hasOwnProperty(j)) {
            console.log(j + ': ' + ticket[j]);
        }
    }
}